package com.martin.study.create_instance.bean;

import com.martin.study.create_instance.bean.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AutowireBean {

	private Emp emp;

	private String str;

	public void say(){
		System.out.println(emp);
		System.out.println(str);
	}

	@Autowired(required = false)
	public void setXxx(Emp emp, String xxx) {
		this.emp = emp;
		this.str = xxx;

	}

}
